package com.qys.livesMall.finance.service;


import com.qys.livesMall.finance.model.dto.AccountSearch;
import com.qys.livesMall.finance.model.dto.user.AddUserAccount;
import com.qys.livesMall.finance.model.entity.user.FinanceUserAccount;
import com.qys.livesMall.framework.view.QysPage;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 店铺余额表 服务类
 * </p>
 *
 * @author
 * @since 2023-06-06
 */
public interface FinanceUserAccountService extends AccountService{


    /**
     * 创建
     * @param userId
     */
    void create(Long userId);

    void createBatch(List<AddUserAccount> users);

    /**
     * 获取
     * @return
     */
    FinanceUserAccount get(Long userId);

    /**
     * 分页列表
     * @param search
     * @return
     */
    QysPage<FinanceUserAccount> list(AccountSearch search);

    List<FinanceUserAccount> listByUserIds(List<Long> userIds);

    /**
     * 总余额
     * @return
     */
    BigDecimal getTotalBalance(Integer userSysType);

    List<String> getSufficientAmountUser(BigDecimal amount);

    /**
     * 根据团id 查询用户总余额
     * @param teamId
     * @return
     */
    BigDecimal getSumUserByteam(Long teamId);

    /**
     * 获取最大余额
     * @param userIds
     * @return
     */
    BigDecimal maxBalanceByUserIds(List<Long> userIds);
}
